package egovframework.nanum.portal.cnfg.common.file;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import com.nanum.portal.cnfg.base.domain.action.RootEntity;
import com.nanum.portal.cnfg.common.vo.Size;

@ToString(callSuper=true, includeFieldNames=true) @EqualsAndHashCode(callSuper=true)
public @Data class File extends RootEntity {
	
	private Long tempSeq;
	
	private String subLocation;
	
	private String name;
	
	private String path;
	
	private Size size;
	
	private boolean large;
	
	public File() {}
	
	public File(Long tempSeq) {
		this.tempSeq = tempSeq;
	}
	
	public File(File file) {
		super(file);
		
		this.tempSeq = file.tempSeq;
		this.subLocation = file.subLocation;
		this.name = file.name;
		this.path = file.path;
		this.size = file.size;
		this.large = file.large;
	}
	
	public boolean isNull() {
		return this.tempSeq == null && this.getSeq() == null;
	}
	
}
